﻿<%@ page title="" language="C#" masterpagefile="MasterPage.master" autoeventwireup="true" inherits="th_admin_cardfahuo, App_Web_bgx0xzll" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentscript" Runat="Server">
    <style type="text/css">
        body{background:white}
    #formtihuokacard table{margin:auto}
    #formtihuokacard td{text-align:left}
    #address{width:450px}

    #formtihuokacard div.cardnum{font-size:14px;font-weight:bold;padding:10px 0px 10px 0px;text-align:center}
    
    .formfahuo{text-align:center}
    .formfahuo table{margin:auto}
    
    #express{width:200px;font-size:14px}
    #expressnum{width:200px;font-size:14px}
    #remark{width:96%;height:80px}
    </style>
    <script type="text/javascript">
        function window.onload() {
            var t="<%=core.setting.get("express")%>".split(",");
	        var i;
            $form.addOption("state", "", "请选择状态");
            for (i = 2; i <= 4; i++) {
                $form.addOption("state", i,i+") "+ $card.state2text(i));
            }
            
            $form.addOption("express","","请选择快递公司");
            for(i=0;i<t.length;i++)
            {
                $form.addOption("express",t[i],t[i]);
            }
            //window.open("xmlcard.aspx?cardid=" + $("#cardid").val());
            $form.ElementsDataFromXML("formfahuo", "xmlcard.aspx?cardid=" + $("#cardid").val());
            
            if($("#expresstime").val()=="")
            {
                $("#expresstime").val("<%=DateTime.Now.ToString()%>");
            }
            
            $("#urlhref").val(window.top.document.location);
            
            if (document.getElementById('express').value=="")
	        {
                $form.focusSelect("express",getCookie("express"));
	        }
	        
        }
        
        function __checkform(evt)
        {
            if(gE("state").value=="")
            {
                alert("请选择卡状态");
                return false;
            }
            if(gE("state").value<=2)
            {
                
                var t="express,expressnum,expresstime,truename,sex,phone,address,postcode".split(',');
                var i;
                for (i=0;i<t.length;i++)
                {

                    gE(t[i]).setAttribute("nullabled",true);
                }
            }
            return jsformcheck(evt, "formfahuo");

        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form id="formfahuo" onsubmit="javascript:return __checkform(event);" action="" method="post" target="_top">
        <fieldset><legend>快递信息</legend>
        <table>
            <tr>
                <td>快递公司</td>
                <td>
                    <select name="express" id="express" alerttext="快递公司" nullabled="false"></select>
                    <a href="javascript:setCookie('express',document.getElementById('express').value);alert('记忆成功'+getCookie('express'));">记住当前快递公司，以便连续录入。</a>
                </td>
            </tr>
            <tr>
                <td>快递编号</td>
                <td><input type="text" id="expressnum" name="expressnum" nullabled="false" maxlength="50" datatype="string" alerttext="快递编号"/></td>
            </tr>
            <tr>
                <td>快递时间</td>
                <td><input type="text" id="expresstime" name="expresstime" nullabled="false" maxlength="50" datatype="string" alerttext="快递时间" value=""/></td>
            </tr>
        </table>
        </fieldset>
        <fieldset><legend>收货人信息</legend>
        <table>
            <tr>
                <td>姓名</td>
                <td><input type="text" id="truename" name="truename" nullabled="false" maxlength="50" datatype="string" alerttext="姓名"/></td>
            </tr>
            <tr>
                <td>性别</td>
                <td><input type="radio" name="sex" nullabled="false" alerttext="请选择性别" value="男"/>男<input type="radio" name="sex" value="女"/>女</td>
            </tr>
            <tr>
                <td>联系电话</td>
                <td><input type="text" id="phone" name="phone" nullabled="false" maxlength="50" datatype="string" alerttext="联系电话"/></td>
            </tr>
            <tr>
                <td>收货地址</td>
                <td><input type="text" id="address" name="address" nullabled="false" maxlength="255" datatype="string" alerttext="收货地址"/></td>
            </tr>
            <tr>
                <td>邮编</td>
                <td><input type="text" id="postcode" name="postcode" nullabled="false" maxlength="50" datatype="string" alerttext="邮编"/></td>
            </tr>
        </table>
        </fieldset>
        <fieldset><legend>备注</legend>
            <textarea id="remark" name="remark" cols="6" maxlength="500" alerttext="备注" nullabled="true"></textarea>
        </fieldset>
        <fieldset><legend>卡状态</legend>
            <select id="state" name="state" nullabled="false" alert="请选择卡状态"></select>
        </fieldset>        
        <div class="center"><input type="submit" value="提交" class="btn2" /><input id="cardid" name="cardid" type="hidden" value="<%=Request.QueryString["cardid"]%>" /><input id="urlhref" name="urlhref" type="hidden" value="" /></div>
    </form>
</asp:Content>

